<div class="content" style="width:902px;margin:100px auto 100px;">
	<div class="nav">
		<div class="install-tips">
		
			创建超极管理员账号,请认真填写，如果忘记密码需要进入服务器进行配置文件删除<br /><br />
	
	
			<dl class="install-form">
				<dt>账号:</dt>
				<dd><input type="text" id="name" name="name" value="<?=!empty($data['core_name'])?$data['core_name']:''?>" /></dd>
				<dt>密码:</dt>
				<dd><input type="password" id="pwd" name="pwd" value="<?=!empty($data['core_pwd'])?$data['core_pwd']:''?>" /></dd>
				<dt>确认密码:</dt>
				<dd><input type="password" id="repwd" name="repwd" value="<?=!empty($data['core_repwd'])?$data['core_repwd']:''?>" /></dd>
				<dt>&nbsp;</dt>
				<dd>
					<a href="<?=n_url('install','init')?>">上一步</a>
					<a href="<?=n_url('install','initStep2')?>" onclick="return initsave(this)">保存，并下一步</a>
					
				</dd>

			</dl>
		</div>

		<ul class="install-step">
			<li class="pass">安装&gt;&gt;</li>
			<li class="curr">创建管理员&gt;&gt;</li>
			<li class="next">系统配置&gt;&gt;</li>
			<li class="next">预览&gt;&gt;</li>
			<li class="next">安装成功&gt;&gt;</li>
		</ul>


	</div>
	<script>
	function initsave(obj){
		var name = $("#name").val();
		var pwd = $("#pwd").val();
		var repwd = $("#repwd").val();
		if(''==name){
			alert("账号不允许为空");
			return false;
		}
		if(6>pwd.length){
			alert("密码长度不能短于6个字符");
			return false;
		}

		if(pwd!=repwd){
			alert('两次密码输入不一致');
			return false;
		}
		$.getJSON("/install/initCache.html",{"name":name,"pwd":pwd,"repwd":repwd},function(rs){
			if(!rs.state){
				alert(rs.msg);
			}else{
				location.href = $(obj).attr("href");
			}
		});
		return false;
	}
	</script>

</div>